using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PACKETPARSERMAX20.CORE;

namespace PACKETPARSERMAX20.CORE.DEFINITIONS
{
    public class SMSG_SPELL_FAILURE_DEF : DefinitionBase
    {

        public override bool Process()
        {
            ResetPosition();
            UInt64 guid = popGuid();
            if (ClientBuild > 7561)
            {
                byte m_cast_count = ReadByte();
                UInt32 spellid = ReadUInt32();
                byte result = ReadByte();
            }
            else
            {
                UInt32 spellid = ReadUInt32();
                byte m_cast_count = ReadByte();
               
            }

            
           // InitLog(); //start the log


          //  if(LogIt) LogAppendLine("UInt64", "guid", guid,  true);
          //  if(LogIt) LogAppendLine("byte", "m_cast_count", m_cast_count);
          //  if(LogIt) LogAppendLine("UInt32", "spellid", spellid);
          //  if(LogIt) LogAppendLine("byte", "result", result);

            

            return Validate();
        }
    }
}
